Integrand size = 33, antiderivative size = 595 \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\frac {b \left (A b^3 \left (15+8 m+m^2\right )+4 a b^2 B \left (15+8 m+m^2\right )+2 a^3 B \left (28+10 m+m^2\right )+a^2 A b \left (110+47 m+5 m^2\right )\right ) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m) (4+m) (5+m)}+\frac {b^2 \left (b^2 B (4+m)^2+2 a A b (5+m)^2+a^2 B \left (36+11 m+m^2\right )\right ) \cos (e+f x) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (3+m) (4+m) (5+m)}+\frac {b (A b (5+m)+a B (8+m)) (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^2 \sin (e+f x)}{c f (4+m) (5+m)}+\frac {b B (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^3 \sin (e+f x)}{c f (5+m)}-\frac {\left (A b^4 \left (3+4 m+m^2\right )+4 a b^3 B \left (3+4 m+m^2\right )+6 a^2 A b^2 \left (4+5 m+m^2\right )+4 a^3 b B \left (4+5 m+m^2\right )+a^4 A \left (8+6 m+m^2\right )\right ) (c \cos (e+f x))^{1+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c f (1+m) (2+m) (4+m) \sqrt {\sin ^2(e+f x)}}-\frac {\left (b^4 B \left (8+6 m+m^2\right )+4 a A b^3 \left (10+7 m+m^2\right )+6 a^2 b^2 B \left (10+7 m+m^2\right )+4 a^3 A b \left (15+8 m+m^2\right )+a^4 B \left (15+8 m+m^2\right )\right ) (c \cos (e+f x))^{2+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c^2 f (2+m) (3+m) (5+m) \sqrt {\sin ^2(e+f x)}} \]
[Out]
Time = 2.14 (sec) , antiderivative size = 595, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3069, 3128, 3112, 3102, 2827, 2722} \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\frac {b^2 \sin (e+f x) \cos (e+f x) \left (a^2 B \left (m^2+11 m+36\right )+2 a A b (m+5)^2+b^2 B (m+4)^2\right ) (c \cos (e+f x))^{m+1}}{c f (m+3) (m+4) (m+5)}+\frac {b \sin (e+f x) \left (2 a^3 B \left (m^2+10 m+28\right )+a^2 A b \left (5 m^2+47 m+110\right )+4 a b^2 B \left (m^2+8 m+15\right )+A b^3 \left (m^2+8 m+15\right )\right ) (c \cos (e+f x))^{m+1}}{c f (m+2) (m+4) (m+5)}-\frac {\sin (e+f x) \left (a^4 B \left (m^2+8 m+15\right )+4 a^3 A b \left (m^2+8 m+15\right )+6 a^2 b^2 B \left (m^2+7 m+10\right )+4 a A b^3 \left (m^2+7 m+10\right )+b^4 B \left (m^2+6 m+8\right )\right ) (c \cos (e+f x))^{m+2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(e+f x)\right )}{c^2 f (m+2) (m+3) (m+5) \sqrt {\sin ^2(e+f x)}}-\frac {\sin (e+f x) \left (a^4 A \left (m^2+6 m+8\right )+4 a^3 b B \left (m^2+5 m+4\right )+6 a^2 A b^2 \left (m^2+5 m+4\right )+4 a b^3 B \left (m^2+4 m+3\right )+A b^4 \left (m^2+4 m+3\right )\right ) (c \cos (e+f x))^{m+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(e+f x)\right )}{c f (m+1) (m+2) (m+4) \sqrt {\sin ^2(e+f x)}}+\frac {b \sin (e+f x) (a B (m+8)+A b (m+5)) (a+b \cos (e+f x))^2 (c \cos (e+f x))^{m+1}}{c f (m+4) (m+5)}+\frac {b B \sin (e+f x) (a+b \cos (e+f x))^3 (c \cos (e+f x))^{m+1}}{c f (m+5)} \]
[In]
[Out]
Rule 2722
Rule 2827
Rule 3069
Rule 3102
Rule 3112
Rule 3128
Rubi steps \begin{align*} \text {integral}& = \frac {b B (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^3 \sin (e+f x)}{c f (5+m)}+\frac {\int (c \cos (e+f x))^m (a+b \cos (e+f x))^2 \left (a c (b B (1+m)+a A (5+m))+c \left (b^2 B (4+m)+a (2 A b+a B) (5+m)\right ) \cos (e+f x)+b c (A b (5+m)+a B (8+m)) \cos ^2(e+f x)\right ) \, dx}{c (5+m)} \\ & = \frac {b (A b (5+m)+a B (8+m)) (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^2 \sin (e+f x)}{c f (4+m) (5+m)}+\frac {b B (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^3 \sin (e+f x)}{c f (5+m)}+\frac {\int (c \cos (e+f x))^m (a+b \cos (e+f x)) \left (a c^2 (a (4+m) (b B (1+m)+a A (5+m))+b (1+m) (A b (5+m)+a B (8+m)))+c^2 \left (b^2 (3+m) (A b (5+m)+a B (8+m))+a (4+m) \left (3 a A b (5+m)+a^2 B (5+m)+b^2 B (5+2 m)\right )\right ) \cos (e+f x)+b c^2 \left (b^2 B (4+m)^2+2 a A b (5+m)^2+a^2 B \left (36+11 m+m^2\right )\right ) \cos ^2(e+f x)\right ) \, dx}{c^2 (4+m) (5+m)} \\ & = \frac {b^2 \left (b^2 B (4+m)^2+2 a A b (5+m)^2+a^2 B \left (36+11 m+m^2\right )\right ) \cos (e+f x) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (3+m) (4+m) (5+m)}+\frac {b (A b (5+m)+a B (8+m)) (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^2 \sin (e+f x)}{c f (4+m) (5+m)}+\frac {b B (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^3 \sin (e+f x)}{c f (5+m)}+\frac {\int (c \cos (e+f x))^m \left (a^2 c^3 (3+m) (a (4+m) (b B (1+m)+a A (5+m))+b (1+m) (A b (5+m)+a B (8+m)))+c^3 (4+m) \left (b^4 B \left (8+6 m+m^2\right )+4 a A b^3 \left (10+7 m+m^2\right )+6 a^2 b^2 B \left (10+7 m+m^2\right )+4 a^3 A b \left (15+8 m+m^2\right )+a^4 B \left (15+8 m+m^2\right )\right ) \cos (e+f x)+b c^3 (3+m) \left (A b^3 \left (15+8 m+m^2\right )+4 a b^2 B \left (15+8 m+m^2\right )+2 a^3 B \left (28+10 m+m^2\right )+a^2 A b \left (110+47 m+5 m^2\right )\right ) \cos ^2(e+f x)\right ) \, dx}{c^3 (3+m) (4+m) (5+m)} \\ & = \frac {b \left (A b^3 \left (15+8 m+m^2\right )+4 a b^2 B \left (15+8 m+m^2\right )+2 a^3 B \left (28+10 m+m^2\right )+a^2 A b \left (110+47 m+5 m^2\right )\right ) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m) (4+m) (5+m)}+\frac {b^2 \left (b^2 B (4+m)^2+2 a A b (5+m)^2+a^2 B \left (36+11 m+m^2\right )\right ) \cos (e+f x) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (3+m) (4+m) (5+m)}+\frac {b (A b (5+m)+a B (8+m)) (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^2 \sin (e+f x)}{c f (4+m) (5+m)}+\frac {b B (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^3 \sin (e+f x)}{c f (5+m)}+\frac {\int (c \cos (e+f x))^m \left (c^4 (3+m) \left (A b^4 \left (15+23 m+9 m^2+m^3\right )+4 a b^3 B \left (15+23 m+9 m^2+m^3\right )+6 a^2 A b^2 \left (20+29 m+10 m^2+m^3\right )+4 a^3 b B \left (20+29 m+10 m^2+m^3\right )+a^4 A \left (40+38 m+11 m^2+m^3\right )\right )+c^4 (2+m) (4+m) \left (b^4 B \left (8+6 m+m^2\right )+4 a A b^3 \left (10+7 m+m^2\right )+6 a^2 b^2 B \left (10+7 m+m^2\right )+4 a^3 A b \left (15+8 m+m^2\right )+a^4 B \left (15+8 m+m^2\right )\right ) \cos (e+f x)\right ) \, dx}{c^4 (2+m) (3+m) (4+m) (5+m)} \\ & = \frac {b \left (A b^3 \left (15+8 m+m^2\right )+4 a b^2 B \left (15+8 m+m^2\right )+2 a^3 B \left (28+10 m+m^2\right )+a^2 A b \left (110+47 m+5 m^2\right )\right ) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m) (4+m) (5+m)}+\frac {b^2 \left (b^2 B (4+m)^2+2 a A b (5+m)^2+a^2 B \left (36+11 m+m^2\right )\right ) \cos (e+f x) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (3+m) (4+m) (5+m)}+\frac {b (A b (5+m)+a B (8+m)) (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^2 \sin (e+f x)}{c f (4+m) (5+m)}+\frac {b B (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^3 \sin (e+f x)}{c f (5+m)}+\frac {\left (A b^4 \left (3+4 m+m^2\right )+4 a b^3 B \left (3+4 m+m^2\right )+6 a^2 A b^2 \left (4+5 m+m^2\right )+4 a^3 b B \left (4+5 m+m^2\right )+a^4 A \left (8+6 m+m^2\right )\right ) \int (c \cos (e+f x))^m \, dx}{(2+m) (4+m)}+\frac {\left (b^4 B \left (8+6 m+m^2\right )+4 a A b^3 \left (10+7 m+m^2\right )+6 a^2 b^2 B \left (10+7 m+m^2\right )+4 a^3 A b \left (15+8 m+m^2\right )+a^4 B \left (15+8 m+m^2\right )\right ) \int (c \cos (e+f x))^{1+m} \, dx}{c (3+m) (5+m)} \\ & = \frac {b \left (A b^3 \left (15+8 m+m^2\right )+4 a b^2 B \left (15+8 m+m^2\right )+2 a^3 B \left (28+10 m+m^2\right )+a^2 A b \left (110+47 m+5 m^2\right )\right ) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (2+m) (4+m) (5+m)}+\frac {b^2 \left (b^2 B (4+m)^2+2 a A b (5+m)^2+a^2 B \left (36+11 m+m^2\right )\right ) \cos (e+f x) (c \cos (e+f x))^{1+m} \sin (e+f x)}{c f (3+m) (4+m) (5+m)}+\frac {b (A b (5+m)+a B (8+m)) (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^2 \sin (e+f x)}{c f (4+m) (5+m)}+\frac {b B (c \cos (e+f x))^{1+m} (a+b \cos (e+f x))^3 \sin (e+f x)}{c f (5+m)}-\frac {\left (A b^4 \left (3+4 m+m^2\right )+4 a b^3 B \left (3+4 m+m^2\right )+6 a^2 A b^2 \left (4+5 m+m^2\right )+4 a^3 b B \left (4+5 m+m^2\right )+a^4 A \left (8+6 m+m^2\right )\right ) (c \cos (e+f x))^{1+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c f (1+m) (2+m) (4+m) \sqrt {\sin ^2(e+f x)}}-\frac {\left (b^4 B \left (8+6 m+m^2\right )+4 a A b^3 \left (10+7 m+m^2\right )+6 a^2 b^2 B \left (10+7 m+m^2\right )+4 a^3 A b \left (15+8 m+m^2\right )+a^4 B \left (15+8 m+m^2\right )\right ) (c \cos (e+f x))^{2+m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{c^2 f (2+m) (3+m) (5+m) \sqrt {\sin ^2(e+f x)}} \\ \end{align*}
Time = 4.73 (sec) , antiderivative size = 319, normalized size of antiderivative = 0.54 \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\frac {(c \cos (e+f x))^m \cot (e+f x) \left (-\frac {a^4 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(e+f x)\right )}{1+m}+\cos (e+f x) \left (-\frac {a^3 (4 A b+a B) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(e+f x)\right )}{2+m}+b \cos (e+f x) \left (-\frac {2 a^2 (3 A b+2 a B) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3+m}{2},\frac {5+m}{2},\cos ^2(e+f x)\right )}{3+m}+b \cos (e+f x) \left (-\frac {2 a (2 A b+3 a B) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+m}{2},\frac {6+m}{2},\cos ^2(e+f x)\right )}{4+m}+b \cos (e+f x) \left (-\frac {(A b+4 a B) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {5+m}{2},\frac {7+m}{2},\cos ^2(e+f x)\right )}{5+m}-\frac {b B \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {6+m}{2},\frac {8+m}{2},\cos ^2(e+f x)\right )}{6+m}\right )\right )\right )\right )\right ) \sqrt {\sin ^2(e+f x)}}{f} \]
[In]
[Out]
\[\int \left (c \cos \left (f x +e \right )\right )^{m} \left (a +b \cos \left (f x +e \right )\right )^{4} \left (A +\cos \left (f x +e \right ) B \right )d x\]
[In]
[Out]
\[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )}^{4} \left (c \cos \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )}^{4} \left (c \cos \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
\[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )}^{4} \left (c \cos \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c \cos (e+f x))^m (a+b \cos (e+f x))^4 (A+B \cos (e+f x)) \, dx=\int {\left (c\,\cos \left (e+f\,x\right )\right )}^m\,\left (A+B\,\cos \left (e+f\,x\right )\right )\,{\left (a+b\,\cos \left (e+f\,x\right )\right )}^4 \,d x \]
[In]
[Out]